<?

include($_SERVER['DOCUMENT_ROOT'].'/includes/functions.inc.php');
include($_SERVER['DOCUMENT_ROOT'].'/config.php');
include($_SERVER['DOCUMENT_ROOT'].'/groups/database.php');
include($_SERVER['DOCUMENT_ROOT'].'/filter.libs.php');

portal_start();

$page_title = "Map";
include($_SERVER['DOCUMENT_ROOT'].'/header.inc.php');


        
        if (!empty($row['description'])) {
                print "<div style=\"padding:5px;margin:5px;background-color:#eeeeee;font-size:1.1em\">".MakeLinks(he($row['description']))."</div>";
        } elseif (!empty($row['excerpt'])) {
                print "<p><b>".he($row['excerpt'])."</b>";
        }


$views = array('heatmap'=>'Density Map');

if ($portal['linear_start_id'] > 0) {
	$views['linear']='Linear Route Map';
}
if (getOne("SELECT anti_sort FROM p2.gridimage{$portal_id}_bi LIMIT 1")) {
	$views['thumbs']='Thumbnail Map';
}

$opt = array();
$opt['view'] = 'heatmap';

if (!empty($_GET['view']) && preg_match('/^\w+$/',$_GET['view'])) {
	$filename = $_SERVER['DOCUMENT_ROOT']."/maps/{$_GET['view']}.php";
	if (file_exists($filename)) {
		$opt['view'] = $_GET['view'];
	}
}


include($_SERVER['DOCUMENT_ROOT']."/maps/{$opt['view']}.php");



#########################

include($_SERVER['DOCUMENT_ROOT'].'/footer.inc.php');

